# try-except

try:
    print(5/0)
except ZeroDivisionError as identifier:
    print("Can't divide by zero!!!!")



# print(5/0)
print('-------------------')

# try-except-else
# 将存在异常的代码存放在try模块中
# 首先尝试执行try模块，若存在异常则运行exception模块；若try模块中无异常，则执行else模块

try:
    print(5/0)
except ZeroDivisionError as identifier:
    print("Can't divide by zero!!!!")
else:
    print('pass')